<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/zeitgeist_administrator.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Zeitgeist Administrator - Manage userdata fields</title>
<!-- InstanceEndEditable -->

<link rel="stylesheet" href="@@{templatepath}@@/css/main.css" type="text/css" />

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-ui-1.7.2.custom.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tooltip.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.filter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.pager.js"></script>

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/chili-1.7.pack.js"></script>

<script language="JavaScript" type="text/javascript">

	$(function() {
		$('#set1 *').tooltip();

		$("#block").click($.tooltip.block);
	});
	
</script>

<!-- InstanceBeginEditable name="head" -->

<script language="JavaScript" type="text/javascript">

$(document).ready(function() 
    { 

		$("#userdatatable")
		.tablesorter({widthFixed: true, widgets: ['zebra']}) 
		.tablesorterPager({container: $("#pager"), positionFixed: false})
		.tablesorterFilter({filterContainer: "#filter-box",
                            filterClearContainer: "#filter-clear-button",
                            filterColumns: [0, 1]});

		; 
    } 
); 

	function deleteField(id, name)
	{
		var answer = window.confirm("Do you really want to delete the userdata field '" + name + "'?\n\nIMPORTANT: The changes are automatically applied for all users. The user information will be LOST!\n\nIMPORTANT: IF your application depends on this userdata field, it may break!\n\n");

		/* Question icon, Yes/No button. */
		/* 0 = error, 1 = OK, 2 = Cancel, 3 = No, 4 = Yes */

		if (answer == true)
		{
		   window.location.href = "@@{[setup.deleteuserdata]}@@"+"&id="+id;
		}
	}	

</script>

<!-- InstanceEndEditable -->
</head>

<body>

	<!-- navigation starts here -->
	<div id="nav">
		
		<h3>Zeitgeist Administrator v2 - <a href="@@{[projects.index]}@@" id="projectlink">@@{activeproject}@@</a></h3>
	
	</div>

	<!-- header starts here -->
	<!-- TemplateBeginBlock name="mainmenu" -->
	<div id="header">	
	
        	<div id="topnavleft">
                <a href="@@{[main.index]}@@"><img src="@@{templatepath}@@/images/icons/home_128.png" id="naviconleft" alt="Home" title="Home" border="0"/></a>
                <a href="@@{[setup.index]}@@"><img src="@@{templatepath}@@/images/icons/setup_128.png" id="naviconleft" alt="Setup application" title="Setup application" border="0" /></a>
                <a href="@@{[users.index]}@@"><img src="@@{templatepath}@@/images/icons/user_128.png" id="naviconleft" alt="Manage users" title="Manage users" border="0" /></a>
                <a href="@@{[projects.index]}@@"><img src="@@{templatepath}@@/images/icons/projects_128.png" id="naviconleft" alt="Manage Zeitgeist Administrator projects" title="Manage Zeitgeist projects" border="0" /></a>
            </div>

        	<div id="topnavright">
                <a href="@@{[main.info]}@@"><img src="@@{templatepath}@@/images/icons/info_128.png" id="naviconright" alt="Info" border="0" /></a>
                <a href="@@{[main.logout]}@@"><img src="@@{templatepath}@@/images/icons/exit_128.png" id="naviconright" alt="Logout" title="Logout" border="0" /></a>
			</div>
            <div style="clear:both;"></div>

	</div>	
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usermessages" -->
		<h3 class="usermessage"><img src="@@{templatepath}@@/images/icons/ok_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usermessage}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="userwarnings" -->
		<h3 class="userwarning"><img src="@@{templatepath}@@/images/icons/warning_32.png" alt="" align="left" style="margin-right:5px;" /> @@{userwarning}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usererrors" -->
		<h3 class="usererror"><img src="@@{templatepath}@@/images/icons/error_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usererror}@@</h3>
	<!-- TemplateEndBlock -->	
				
	<!-- content-wrap starts here -->
	<div id="content-wrap">
    <div id="content">	 

		<div id="sidebar" >	
        <!-- InstanceBeginEditable name="sidebar" -->

			<h3>Managing userdata</h3>
			<p>The userdata fields are additional data fields that can be associated with users (e.g. email address or phone number).</p>
            <p>The data fields are available for all users abd are accessible directly from the application (via the userdata class or the userhandler abstraction).</p>
			<h3>Important</h3>
			<p>All changes are automatically applied for all users. Be careful not to delete or edit any fields your application is already using and depending on.</p>
            
            
		<!-- InstanceEndEditable -->
		</div>	
	
		<div id="main">		
        <!-- InstanceBeginEditable name="main" -->

			<h2>Manage userdata fields</h2>

			<table id="controltable" border="0" cellpadding="0" cellspacing="5" width="100%">
			<tr>
				<td>
				<p>
					<a href="@@{[setup.createuserdata]}@@" alt="Create a new userdata field"><img src="@@{templatepath}@@/images/icons/new_22.png" alt="Create a new userdata field" title="Create a new userdata field" border="0" align="absmiddle" /></a>
					<a href="@@{[setup.createuserdata]}@@" alt="Create a new userdata field">Create a new userdata field</a>
				</p>
				</td>
				<td class="filter">
				<p style="text-align:right;">
					Search: 
					<input name="filter" id="filter-box" value="" maxlength="50" size="30" type="text">
					<input id="filter-clear-button" type="submit" value="Clear"/>
				</p>
				</td>
			</tr>
			</table>

            <table id="userdatatable" border="0" cellpadding="0" cellspacing="5" width="100%">
	       	<thead>
	        <tr>
				<th><p>Field name</p></th>
				<th><p>Type</p></th>
				<th><p>Length</p></th>
				<th><p style="text-align:center;">Actions</p></th>
	        </tr>
            </thead>
            <tbody>
            <!-- TemplateBeginBlock name="userdata" -->
                <tr>
				<td id="listtable"><p>@@{userdata_field}@@</a></p></td>
				<td id="listtable"><p>@@{userdata_type}@@</a></p></td>
				<td id="listtable"><p>@@{userdata_length}@@</a></p></td>
				<td id="listtable" align="center"><p><nobr>
					<a href="@@{[setup.edituserdata]}@@&id=@@{userdata_field}@@" alt="Edit userdata field">
						<img src="@@{templatepath}@@/images/icons/edit_22.png" alt="Edit module" title="Edit userdata field '@@{userdata_field}@@'" border="0" />
					</a> &nbsp; 
					<a href="javascript:deleteField('@@{userdata_field}@@', '@@{userdata_field}@@')" alt="Delete userdata field">
						<img src="@@{templatepath}@@/images/icons/delete_22.png" alt="Delete userdata field" title="Delete userdata field '@@{userdata_field}@@'" border="0" />
					</a>
				</nobr></p></td>
                </tr>
            <!-- TemplateEndBlock -->
            </tbody>
            </table>

            <div id="pager" class="pager">
				<form class="noborder">
	            <table id="pagertable" border="0" cellpadding="0" cellspacing="5" width="100%">
                <tr><td>
					<img src="@@{templatepath}@@/images/icons/2leftarrow_22.png" class="first"/>&nbsp;
					<img src="@@{templatepath}@@/images/icons/1leftarrow_22.png" class="prev"/>
				</td><td align="right">
					<input type="text" class="pagedisplay" style="text-align:center;"/>
				</td><td>
					<select class="pagesize">
						<option selected="selected"  value="10">&nbsp;10&nbsp;</option>
						<option value="20">&nbsp;20&nbsp;</option>
						<option value="30">&nbsp;30&nbsp;</option>
						<option  value="40">&nbsp;40&nbsp;</option>
					</select>
				</td><td align="right">
					<img src="@@{templatepath}@@/images/icons/1rightarrow_22.png" class="next"/>&nbsp;
					<img src="@@{templatepath}@@/images/icons/2rightarrow_22.png" class="last"/>
				</td></tr>
				</table>
				</form>
            </div>

		<!-- InstanceEndEditable -->
		</div>					
		
	<!-- content-wrap ends here -->		
	</div>
    </div>

	<!-- footer starts here-->	
	<div id="footer-wrap">
		
		<div id="footer-bottom">		
			<p>
			&copy; 2009 <strong><a href="http://www.menschenwerk.net">Menschenwerk.net</a></strong> | 
			Original template design: <a href="http://www.styleshout.com/">styleshout</a> | 
            Icons by: <a href="http://www.icon-king.com/projects/nuvola/">David Vignoni</a>
			</p>		
		</div>	
	
	<!-- footer ends-->		
	</div>

</body>
<!-- InstanceEnd --></html>
